//
//  ATWLoginMetaData.h
//  WorkplusIM-IOS
//
//  Created by lingen on 15/10/8.
//  Copyright © 2015年 lingen.liu. All rights reserved.
//

#import <Foundation/Foundation.h>
@class AWSessionMetaData;
@class ATWAuth;

typedef void (^LoginBlock)(ATWAuth* auth);

typedef void (^EndpoingBlock)(AWSessionMetaData* sessionMetaData);

@interface ATWLoginMetaData : NSObject

/*登录用户名*/
@property (nonatomic,strong) NSString *clientId;

/*登录密码*/
@property (nonatomic,strong) NSString *clientSecret;

/*设备ID*/
@property (nonatomic,strong) NSString *deviceId;

/*租户ID*/
@property (nonatomic,strong) NSString *tenantId;

/*使用用户名，密码，设备ID，租户ID来构建一个登录元数据*/
-(instancetype)initLoginMetaData:(NSString*)clientId secret:(NSString*)clientSecret deviceId:(NSString*) deviceId tenantId:(NSString*)tenantId;

/*使用用户名，密码，租户ID来构建一个登录元数据 deviceID将使用默认的生成策略*/
-(instancetype)initLoginMetaData:(NSString *)clientId secret:(NSString *)clientSecret tenantId:(NSString *)tenantId;

/*登录*/
-(void)login:(LoginBlock)result;

/*endpoing*/
-(void)endpoing:(ATWAuth *)auth result:(EndpoingBlock)endpoingBlock;


@end
